<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/7/13
 * Time: 12:59
 */
namespace app\admin\model;

use think\Model;


class UserModel extends Model
{
    //表名
    protected $table = 'dx_user';

    public function project()
    {
        return $this->belongsTo('ProjectModel', 'user_id', 'user_id');
    }
    public static function getwww($id){
       return self::with('project')->find($id);

    }
	static public function SelectAll()
		{
			return db('user') -> field('user_name,user_tel,user_sex,companyname,position,is_pass,referee,subscribe_time,time')
							  -> select();
		}
}